Description |
Gets the file at the specified URL and saves it in the Configuration/Temp folder inside the Dreamweaver application folder on the user's hard drive. Dreamweaver automatically creates subfolders that mimic the directory structure of the server; for example, if the specified file is at http://www.dreamcentral.com/people/index.html, Dreamweaver stores the index.html file in the people folder inside the www.dreamcentral.com folder. |
Arguments |
URL, {prompt}, {saveURL}, {titleBarLabel} |
|
 |
The first argument is an absolute URL on a web server; if the "http://" part of the URL is omitted, it is assumed. |
 |
The second argument is a Boolean value that specifies whether to prompt the user to save the file. If saveURL is outside the Configuration/Temp folder, a prompt value of FALSE is ignored for security reasons. |
 |
The third argument is the location on the user's hard drive where the file should be saved, expressed as a file:// URL. If prompt is TRUE or saveURL is outside the Configuration/Temp folder, the user can override saveURL in the Save dialog box. |
 |
The fourth argument is the label that should appear in the title bar of the Save dialog box. |
|
Returns |
An object that represents the reply from the server. The data property of this object is a string containing the location at which the file was saved, expressed as a file:// URL. Normally the statusCode property of the object contains the status code received from the server. However, if a disk error occurs while saving the file on the local drive, the statusCode property contains an integer representing one of the following error codes if the operation was not successful: |
|
 |
1: Unspecified error |
 |
2: File not found |
 |
3: Invalid path |
 |
4: Number of open files limit reached |
 |
5: Access denied |
 |
6: Invalid file handle |
 |
7: Cannot remove current working directory |
 |
8: No more directory entries |
 |
9: Error setting file pointer |
 |
10 Hardware error |
 |
11: Sharing violation |
 |
12:Lock violation |
 |
13: Disk full |
 |
14: End of file reached |
|
Example |
The following code gets an HTML file, saves all the files in the Configuration/Temp folder, and then opens the local copy of the HTML file in a browser: |
 |
|